-
Notifications
You must be signed in to change notification settings - Fork 2
Add onewire #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add onewire #38
Conversation
…file and test_main.ino. Signed-off-by: Frederikwag <[email protected]>
Signed-off-by: Frederikwag <[email protected]>
Signed-off-by: Frederikwag <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds tests for the OneWire sensor by introducing new test cases and supporting build targets for verifying device connection, chip description, and data retrieval.
- Added a preprocessor block in the main test file to run onewire sensor tests.
- Created a new test file with three test cases for OneWire sensor functionality.
- Updated the Makefile to include a target for the OneWire sensor tests.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/test_main.ino | Added preprocessor condition to run onewire sensor tests. |
src/corelibs/onewire/test_onewire_sensor.cpp | Added new tests for device presence, chip description, and data retrieval on OneWire bus. |
Makefile | Introduced a new target for OneWire sensor tests. |
// OneWire instance and variables | ||
static OneWire oneWire(5); // Pin 5 is used for the OneWire bus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider defining a named constant for the OneWire bus pin instead of using the hard-coded value (5) to enhance code readability and ease future modifications.
// OneWire instance and variables | |
static OneWire oneWire(5); // Pin 5 is used for the OneWire bus | |
// Define the pin used for the OneWire bus | |
constexpr int ONE_WIRE_BUS_PIN = 5; | |
// OneWire instance and variables | |
static OneWire oneWire(ONE_WIRE_BUS_PIN); // Use named constant for the OneWire bus pin |
Copilot uses AI. Check for mistakes.
Signed-off-by: Frederikwag <[email protected]>
Signed-off-by: Frederikwag <[email protected]>
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
CONTRIBUTING.md also tells you what to expect in the PR process.
Description
Added the OneWire-Test. Therefore, 3 tests are executed:
Related Issue
Context